projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49322a3
)
trivial-httpd: Add __attribute__((format))
author
Colin Walters
<walters@verbum.org>
Sat, 7 May 2016 15:22:47 +0000
(11:22 -0400)
committer
Colin Walters
<walters@verbum.org>
Sat, 7 May 2016 15:22:47 +0000
(11:22 -0400)
I was briefly looking at building with clang mostly since it
detects unused variables with cleanup attributes, but then
I hit this fatal error.
It's a hard compile error with `-Wformat-nonliteral` since clang
doesn't know it's a format string.
src/ostree/ot-builtin-trivial-httpd.c
patch
|
blob
|
history
diff --git
a/src/ostree/ot-builtin-trivial-httpd.c
b/src/ostree/ot-builtin-trivial-httpd.c
index 0300b128295925c7c1c0a4a48d5dc76e56c80fb4..811e8924b02366826868e998f03dd687cf659a67 100644
(file)
--- a/
src/ostree/ot-builtin-trivial-httpd.c
+++ b/
src/ostree/ot-builtin-trivial-httpd.c
@@
-56,6
+56,9
@@
static GOptionEntry options[] = {
{ NULL }
};
+static void
+httpd_log (OtTrivialHttpd *httpd, const gchar *format, ...) __attribute__ ((format(printf, 2, 3)));
+
static void
httpd_log (OtTrivialHttpd *httpd, const gchar *format, ...)
{